from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep

driver = webdriver.Chrome()
driver.get("http://www.vemmis.com/bjq/index.html")   # 富文本编辑器
sleep(2)
driver.switch_to.frame("ueditor_0")
body = driver.find_element_by_css_selector("body")
body.send_keys("123456789")
body.send_keys(Keys.CONTROL, "a")
driver.switch_to.default_content()
driver.find_element_by_css_selector("#edui9_body > div").click()
sleep(1)
driver.switch_to.frame("ueditor_0")
body.click()

sleep(2)
driver.quit()
